package com.youlu.campus.entity;

import com.youlu.campus.base.base.EntityBase;
import lombok.Getter;
import lombok.Setter;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

/**
 * 活动任务规则配置,奖励的发放规则
 */
@Getter
@Setter
@Document(collection = "activity_task_rule")
public class ActivityTaskRule extends EntityBase {
    /**
     * 活动ID
     */
    @Indexed
    private String activityId;
    /**
     * 任务ID
     */
    @Indexed
    private String taskId;
    /**
     * 业务类型:"ca":证书,"membership":会员,"item":商品,"cash":现金
     */
    @Indexed
    private String bizType;
    /**
     * 业务ID,对应具体业务的ID,例如证书ID
     */
    private String bizId;
    /**
     * 门限,合格的值
     */
    @Indexed
    private Integer threshold = 1;
    /**
     * 单位:例如，邀请人数;下单量;爱心值
     */
    private String unit;
    /**
     * 是否默认获取
     */
    private Boolean defaulted = Boolean.FALSE;
    /**
     * 奖励值
     */
    private Double points = 10.0D;

    /**
     * 额外奖励值
     */
    private Double extraPoints = 0D;

    /**
     * Logo
     */
    private String logo;
    /**
     * 优先级,排序
     */
    private Integer priority;
}
